package com.ruoyi.common.tools.translation;

import org.springframework.stereotype.Component;

import com.ruoyi.common.annotation.TranslationType;
import com.ruoyi.common.tools.constant.ERecordTransConstant;
import com.ruoyi.common.translation.TranslationInterface;
import com.ruoyi.erecord.employee.service.IEmployeeService;

import lombok.AllArgsConstructor;

@Component
@AllArgsConstructor
@TranslationType(type = ERecordTransConstant.EMPLOYEE_ID_TO_NAME)
public class EmployeeUserNameTranslationImpl implements TranslationInterface<String> {

	private final IEmployeeService employeeService;

	public String translation(Object key, String other) {
		return employeeService.getEmployeeNameById((Long) key);
	}

}
